<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcCms.Web.ViewModels.BackOfficeModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    MvcCms -
    <%=ViewData["PageTitle"]%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="contentpage-outerdiv">
        <h2>
            <%=ViewData["PageTitle"]%></h2>
        <span class="field-validation-error">&nbsp;<%= Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") %>
            <%=ViewData["message"].ToString()%></span>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="data-table">
            <tr>
                <th>
                    &nbsp;
                </th>
                <th>
                    Title
                </th>
                <th>
                    Added Date
                </th>
                <th>
                    Approved
                </th>
                <th>
                    Members Only
                </th>
                <th>
                    Published Version
                </th>
                <th>
                    Content Category
                </th>
            </tr>
            <% foreach (var item in Model._DTOContentPageForEditor)
               { %>
            <tr>
                <td>
                    <a href="/backoffice/editcontentpage/<%=item.ContentPageID %>">Edit</a>
                </td>
                <td>
                    <%= Html.Encode(item.Title) %>
                </td>
                <td>
                    <%= Html.Encode(item.AddedDate) %>
                </td>
                <td>
                    <%= Html.Encode(item.Approved) %>
                </td>
                <td>
                    <%= Html.Encode(item.OnlyForMembers) %>
                </td>
                <td>
                    <%= Html.Encode(item.IsCategoryPage) %>
                </td>
                <td>
                    <%= Html.Encode(item.CatName) %>
                </td>
            </tr>
            <% } %>
        </table>
        <p>
            <%= Html.ActionLink("Create New", "CreateContentPage") %>
        </p>
        <div>
            Pages are able to be edited with Windows Live Writer. <a href="http://www.mvccms.com/cms/wysiwyg-editor">
                Click here</a> for instructions.</div>
    </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>
